package com.simit.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class UserController {

    @RequestMapping("/save")
    @ResponseBody
    public String save() {
        System.out.println("save ...");
        return "{info:springMVC}";
    }

    @RequestMapping("/listJson")
    @ResponseBody
    public String listJson(@RequestBody List<String> likes) {
        System.out.println("listJson" + likes);
        return "{'info':'listJson'}";
    }
}
